{template 'common/header'}
    <ul class="nav nav-tabs">
        <li class="active"><a href="{php echo $this->createWebUrl('Zhaoinfo');}">企业编辑</a></li>
    </ul>
    <div class="main">
        <form class="form-horizontal" action="" role="form" method="post">
        <input type="hidden" name="token" value="{$_W['token']}" />
        <input type="hidden" name="cid" value="{$row['id']}" />

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">名称</label>
            <div class="col-sm-4">
                <input type="text" name="data[name]" value="{$row['name']}" class="form-control">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">行业分类</label>
            <div class="col-sm-4">
                <select name="data[industry]" class="form-control">
                    {loop $parents $key $industry}
                        <option value="{$industry['id']}" {if !empty($industry['sub'])} disabled="disabled" {/if} {if $row['industry'] == $industry['id'] }selected{/if}  >{$industry['name']}</option>
                        {loop $industry['sub'] $k $subs}
                        <option value="{$subs['id']}" {if intval($subs['id']) == intval($row['industry'])} selected {/if} {if $row['industry'] == $subs['id'] }selected{/if} >&nbsp;|— {$subs['name']}</option>
                        {/loop}
                    {/loop}
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">地址</label>
            <div class="col-sm-4">
                <input type="text" name="data[address]" value="{$row['address']}" class="form-control">
            </div>
        </div>


        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">联系人</label>
            <div class="col-sm-4">
                <input type="text" name="data[contact]" value="{$row['contact']}" class="form-control">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">电话</label>
            <div class="col-sm-4">
                <input type="text" name="data[mobile]" value="{$row['mobile']}" class="form-control">
            </div>
        </div>


        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">规模</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[scale]">
                    {loop $config['scale'] $key $welfare}
                    <option value="{$key}" {if intval($row['scale']) == intval($key)} selected {/if}>{$welfare}</option>
                    {/loop}
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">类别</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[type]">
                    {loop $config['companytype'] $key $type}
                    <option value="{$key}" {if intval($row['type']) == intval($key)} selected {/if}>{$type}</option>
                    {/loop}
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">公司简介</label>
            <div class="col-sm-4">
                <textarea name="data[description]" class="form-control" rows=8"">{$row['description']}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">营业执照</label>
            <div class="col-sm-4">
                <a href='{$_W[attachurl]}thinkidea_rencai/{$row['license']}' target='_blank'><img src='{$_W[attachurl]}thinkidea_rencai/{$row['license']}' style='max-width:200px;' /></a>
            </div>
        </div>
          <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">企业封面</label>
            <div class="col-sm-4">
                <a href='{$_W[attachurl]}thinkidea_rencai/{$row['avatar']}' target='_blank'><img src='{$_W[attachurl]}thinkidea_rencai/{$row['avatar']}' style='max-width:200px;' /></a>
            </div>
        </div>
              <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">LOGO</label>
            <div class="col-sm-4">
                <a href='{$_W[attachurl]}thinkidea_rencai/{$row['logo']}' target='_blank'><img src='{$_W[attachurl]}thinkidea_rencai/{$row['logo']}' style='max-width:200px;' /></a>
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">认证</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[isauth]">
                    <option value="0" {if $row['isauth'] == 0} selected {/if}>未认证</option>
                    <option value="1" {if $row['isauth'] == 1} selected {/if}>电话认证</option>
                    <option value="2" {if $row['isauth'] == 2} selected {/if}>执照认证</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">已查看简历数</label>
            <div class="col-sm-4">
                <input type="text" name="data[view_resume_nums]" value="{$row['view_resume_nums']}" class="form-control">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">总查看简历数</label>
            <div class="col-sm-4">
                <input type="text" name="data[view_resume_total]" value="{$row['view_resume_total']}" class="form-control">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">状态</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[status]">
                    <option value="1" {if $row['status'] == 1} selected {/if}>通过</option>
                    <option value="0" {if isset($row['status']) && $row['status'] == 0} selected {/if}>待审</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">名企推荐</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[position]">
                    <option value="1" {if $row['position'] == 1} selected {/if}>是</option>
                    <option value="0" {if isset($row['position']) && $row['position'] == 0} selected {/if}>否</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">地图</label>
            <div class="col-sm-4">
                {php echo tpl_form_field_coordinate('data[coordinate]', $value = array('lng'=>$coordinate['lng'], 'lat'=>$coordinate['lat']));}
            </div>
        </div>

        <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <input type="hidden" name="companyid" value="{$row['id']}">
            <input type="submit" class="btn btn-primary" name="save_info" value="保存">
        </div>
    </div>
    </form>
</div>
{template 'common/footer'}